package com.prs.crm.dao.stu.impl;

import java.io.Serializable;
import java.sql.SQLException;
import java.util.Collection;
import java.util.List;

import org.courser.hibernate.QueryExample;
import org.courser.ui.PaginationSupport;
import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.springframework.orm.hibernate3.HibernateCallback;

import com.prs.crm.dao.impl.BaseDaoImpl;
import com.prs.crm.dao.stu.GradesDao;
import com.prs.crm.domain.student.Grades;
/**
 * @author 廖苹宏
 * @version 2012-4-26 9:36:24 年级信息表
 * */
public class GradesDaoImpl extends BaseDaoImpl<Grades> implements GradesDao {

	@SuppressWarnings("unchecked")
	public List<Grades> getAllGrade() {
		
		return (List<Grades>)this.getHibernateTemplate().execute(new HibernateCallback() {
			@Override
			public Object doInHibernate(Session arg0)
					throws HibernateException, SQLException {
				Criteria crteria = arg0.createCriteria(Grades.class);
				return crteria.list();
			}
		});
	}


}
